package com.googlecode.gmf.io;

import java.io.*
import com.googlecode.gmf.data.*

class MindFieldReader {

	static readMindField(File file) {
		Web web = Web.getAnEmptyWeb()
		def notes = new XmlSlurper().parseText(file.text)
		for (note in notes.note) {
			web.addNode(new Node(
					title: note.title.text(),
					content: note.content.text()
					))
		}
		return web
	}
}